package com.zhao.handler;

public abstract class Handler {

    protected final Integer NUM_ONE = 1;

    protected final Integer NUM_THREE = 3;

    protected final Integer NUM_SEVEN = 7;


    protected String post;

    protected Integer start_num;

    protected Integer end_num;

    protected Handler nextHandler;

    public void handle(Integer num) {
        if (num > end_num) {
            nextHandler.handle(num);
            return;
        }
        System.out.println(post + ", 批准" + num + "天假期。");
    }

    public void setNextHandler(Handler handler) {
        this.nextHandler = handler;
    }
}
